package com.omt.tarjimdinek.domain.user.Service;

import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;

import org.apache.log4j.Logger;

import com.omt.tarjimdinek.domain.user.dao.ParametrageDao;
import com.omt.tarjimdinek.domain.user.entity.Parametrage;
import com.omt.tarjimdinek.support.GenericDao;
import com.omt.tarjimdinek.support.RepositoryImpl;

/**
 * Setting manager implements
 * @author chabane
 *
 */
@Named("settingRepository")
@Singleton
public class ParametrageRepositoryImpl extends RepositoryImpl<Parametrage, String> implements ParametrageRepository {

	private ParametrageDao parametrageDao; 
	
	@SuppressWarnings("unused")
	private static final Logger log = Logger.getLogger(ParametrageRepositoryImpl.class);

	@Inject
	public void setParametrageDao(ParametrageDao parametrageDao) {
	   this.parametrageDao = parametrageDao;
	}

	/**
	  * Dao getter used by the {@link RepositoryImpl}.
	  */
	@Override
	public GenericDao<Parametrage, String> getDao() {
	   return parametrageDao;
	}     

	/**
     * {@inheritDoc}
     */
    @Override
    public Parametrage getNew() {
        return new Parametrage();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public Parametrage getNewWithDefaults() {
    	Parametrage result = getNew();
        result.initDefaultValues();
        return result;
    }

}
